package edu.ptit.jad.similarity;

public class Score {

	ScoreType type;

	public Score(ScoreType type) {
		this.type = type;
	}

	public double calculate(double tfidf, double lda, double au_lda,
			double au_cates_lda) {

		switch (type) {

		case TF_IDF:
			return tfidf;
		case TFIDF_AND_LDA:
			return (tfidf + lda) / 2;
		case TFIDF_AND_AT:
			double anpha = 1.0;
			double beta = 0.0;
			double gama = 0.0;

			return (anpha * tfidf + beta * au_cates_lda + gama * au_lda);
		case TFIDF_AND_AT_LDA:
			return (tfidf + au_lda) / 2;

		default:
			return 0;
		}

	}
}